import request from '@/utils/request'
import { downFile } from '@/utils/request'

export function getBomList(query) {
  return request({
    url: '/mes/md/bom/list',
    method: 'get',
    params: query,
  })
}

export function getBOMQuery(query) {
    return request({
      url: '/mes/md/bom/queryBOM',
      method: 'get',
      params: query,
    })
  }

export function insertbom(data) {
  return request({
    url: '/mes/md/Bom/addBom',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}


export function updatebom(data) {
  return request({
    url: '/mes/md/Bom/updateBom',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}


export function delbom(data) {
  return request({
    url: '/mes/md/Bom/delBom',
    method: 'post',
    data: data,
    contextType:"application/json"
  })
}

export function getunitList(query) {
    return request({
      url: '/mes/md/Bom/getunitList',
      method: 'get',
      params: query,
    })
}
  